* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f1f1f1;
}

.container {
    position: relative;
    perspective: 800px;
    width: 300px;
    height: 300px;
}

.grid {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    height: 100%;
}

.grid-item {
    width: 33.33%;
    height: 33.33%;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.3s;
}

.grid-item:hover {
    transform: translateZ(30px);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.image {
    width: 100%;
    height: 100%;
    background-image: url(../resources/square-test-1.jpg);
    background-size: cover;
    background-position: center;
    transform: translateZ(0);
    backface-visibility: hidden;
}